package com.jiazhong.text;

import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int month=sc.nextInt();
        int sum=0;
        switch (month){
            case 5:
                sum+=31;
            case 4:
                sum+=30;
            case 3:
                sum+=31;
            case 2:
                sum+=29;
            case 1:
                sum+=31;




        }
        System.out.println(sum);
    }
}
